﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BlogAppExt.Models
{
    /// <summary>
    /// CommentPost object for storing user comments
    /// Stores an ID pointing back to the BlogPost object it belongs to
    /// </summary>
    public class CommentPost : BlogItem
    {
        private int replyToID;

        public int ReplyToId
        {
            get { return replyToID; }
        }
        
        /// <summary>
        /// CommentPost object for storing user comments
        /// </summary>
        /// <param name="replyToId">The ID of the BlogPost object this should point to</param>
        /// <param name="userId">The user ID of the commenter</param>
        /// <param name="text">The comment text</param>
        public CommentPost(int replyToId, int userId, string text)
        {
            replyToID = replyToId;
            userID = userId;
            Title = "Comment";
            Text = text;
        }
    }
}